package cn.hr.entity;


import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * 项目记录实体类
 */
@Entity
@Table(name="tb_itemrecord"
    ,catalog="hrm"
)

public class ItemRecord  implements java.io.Serializable {


    // Fields    

     /**
	 * 
	 */
	private static final long serialVersionUID = 4264143818575498605L;
	private Long id;
     private Student student;
     private Item item;
     private String position;
     private Integer points;
     private Timestamp addTime;


    // Constructors

    /** default constructor */
    public ItemRecord() {
    }

    
    /** full constructor */
    public ItemRecord(Student student, Item item, String position, Integer points, Timestamp addTime) {
        this.student = student;
        this.item = item;
        this.position = position;
        this.points = points;
        this.addTime = addTime;
    }

   
    // Property accessors
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)

    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="studentId", nullable=false)

    public Student getStudent() {
        return this.student;
    }
    
    public void setStudent(Student student) {
        this.student = student;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="itemId", nullable=false)

    public Item getItem() {
        return this.item;
    }
    
    public void setItem(Item item) {
        this.item = item;
    }
    
    @Column(name="position", nullable=false, length=16)

    public String getPosition() {
        return this.position;
    }
    
    public void setPosition(String position) {
        this.position = position;
    }
    
    @Column(name="points", nullable=false)

    public Integer getPoints() {
        return this.points;
    }
    
    public void setPoints(Integer points) {
        this.points = points;
    }
    
    @Column(name="addTime", nullable=false, length=0)

    public Timestamp getAddTime() {
        return this.addTime;
    }
    
    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }
   








}